package com.school.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.school.mapper.LeaveMapper;
import com.school.pojo.Leave;
import com.school.service.LeaveService;
import com.school.util.Result;

@Service
@Transactional
public class LeaveServiceImpl implements LeaveService{
	
	@Autowired
	private LeaveMapper leaveMapper; 
	
	@Override
	public List<Leave> findAll(int page, int pageSize, Leave t) {
		PageHelper.startPage(page,pageSize);
		return leaveMapper.findAll(t);
	}

	@Override
	public int delbatch(int[] id) {
		
		return leaveMapper.delbatch(id);
	}

	@Override
	public List<Leave> findbyId(int id) {
		
		return leaveMapper.findbyId(id);
	}

}
